Write support in prefs.js
Tidying everything up.