python 3 compatibility and some general improvements
Merge pull request #93 from gitaarik/master

python 3 compatibility and some general improvements