Bug fixes and code to add unspecified prefs