Changed the way header and footer is loaded