Added layout functionality into pages.