Refactored the theme plugin
Refactored the page controller