Refactor header and footer php.