Moved more code to footer.php