Adjust preference handling for best practice

By listening for prefs changes, you can properly handle the user manually changing their prefs file (or the possibility of the pref changing values when changing projects). There also becomes no reason to store the pref value in a local variable (unless you really need to know whether the value has changed).