Refactoring templates into separate files