Move template to external file