Added prefs
Some clean up after adding preferences