Adjust preference handling for best practice
Merge pull request #1 from dangoor/fix-prefs

Adjust preference handling for best practice