Added support for remembering preferences.