Refactor templates to there own file