Updating mongo wrapper to comply with the latest API definition.