Moved loadPreferences() from PreferencesUI to Preferences. This way Preferences always calls loadPreferences() when it's initialized at the beginning of the program.