started to refactor the CvTemplateFieldController