Move local storage updates to the database class