Preferences working, though a leak causes app to crash.