moving local storage read/writes to database_rating.js