GPII-716: Refactor prefsEditor.js.