More fixes and improvements.
Fix deviceArray in Pref360ControlPref from leaking.