Preferences work a little better, but still some bugs