Added preferences.
Cleaned up.