Moved the ending part of a control change into a single separate method.