Refactoring and Theming

Some refactoring of pages, partial implementation of theming