Python 3 support

Fixes #107