Templated the main screen

Split the main screen into templates for seperation of concerns.