Structure of layout.html refactored