some refactoring

removed old template loader