Split templates into files