Better preferences
Fix testapp