Interim commit

Refactoring to support new templates