PEP8 fixes and a Py3 compatibility fix.