Python 3 Support

- added Python 3 support, without breaking Python 2
- PEP 8 style fixes
- cleanups
- renamed some by mistake renamed functions

only one doctest is failing for the .info method, but this is also a failure in upstream