Replace Mongo class with MongoClient; replace 'safe' option with 'w' so class works with mongo driver version 1.5