Refactor into a templates folder