Move repeated code into header.php and footer.php, add links to footer.php