cot: theme engine (final commit)