server.js cleaned up, db/mongodb.js made more stable