added getObjectsFields methods to db class, changed getUsers methods to use the new method, refactor to user.js and mongo.js