Restructure layouts so only the minimum amount of code is loaded in the home page