Some cleanup in test_mixins.py.
PEP8 fixes.
Doctests not dependant on random seed.
Some Python 3 fixes.