Themes

Please feel free to review as you wish.

Note: Theme edition doesn't work yet. While doing some basic refactoring on themes, I dropped upon bugs with editing themes, and this PR is reworking some the approach taken there.