Initial code with Python 3.2.
Self-contained, don't rely on PyMongo.