Changed the constructor to expect MongoClient instead of legacy MongoDB