Squashed 'cgilite/' changes from c207699..80b3d8c