Refactoring FlowTemplatesController mapping methods