fix preferences to make a true service with local app state