Migrating to templating system