OP-1088 Phase two, clean up the code behind the GUI.