Basic prefs code that doesn't yet work, see TODO