Pushed theme handling into the framework - no hard-coding

Session handling for theme changes was also added.