Refactoring for TemplateDef-enabled per-custom-result templates. refs #500