Added basic template for pages, fixed minor bugs in header and functionality.