Improve handling of preferences in Firefox
Merge pull request #4225 from Snuffleupagus/prefs-v3

Improve handling of preferences in Firefox