Updates to template system