Added support for Preferences.