Updated the update hook to work with the key-value stored preferences.