Added support for a template system