Python 3 support

Fixes #6

I'm not done with this yet, but I will be in a moment.