Add Template and TemplateFactory

Reorder config.yml to match new spec