Move MyPreferences to its own class file.