Simplify templating of quad_forms.