Post theme engine merge clean up.

After the dust settings, refactor branch and squash with

ee44ccb20a8fea81583ffc550aa92d4736659bf3
Squashed commit of the theme engine support.