Initial support for preferences, works in emulator