Updated to use MongoDb