preferences code cleanup
Merge branch 'master' into nook