refactoring layout.html to include head.html and foot.html