refactor to get more consistent behavior between the edits in ProgramContentVariableController