updates to db.js and users.js to support Models