Move template to its own file