refactor page header and footer