refactored the template references