mongo.py: better grouping of imports