- added Python 3 support, without breaking Python 2
- PEP 8 style fixes
- cleanups