Move index boilerplate to a layout