cec: clean ups and only include what we need from lib/platform.