Squashed 'cgilite/' changes from a1caf91..a836764