Support for Python 3

Closes #9