move index template into its own file