added rough first version of the SwitchPreference class.