Update to use new TemplateFunction arguments.