Simplified the MongoDB class.