Refactored replica set monitor to use mongo connection instead of mongo client