Convert to Python 3

Fixes #6.