Adds concepts of templates

Enables dynamic loading of templates and schemas.