Implement shared template_helpers class.