Add Preferences class.

Add Preferences class.