fix index template
move layout to its own file