CLEAN some code and restore mokey patching pymongo