Fixed Python 3.3+ compatibility

Fixes #109 and fixes #108 and fixes #107.