WIP trying to figure out how to make this faster. Added fast_template_instance accessor.