Refactored templates into separate files