Refactored python3 support
Merge pull request #32 from marcwebbie/master

Refactored python3 support