Added singleton class to connect to mongo db.