Refactoring to create tabs view and routes sub-view. Refactored to move HTML into templates.