Move all templating to seperate files