- add Python 3 support
- code cleanup