Get rid of 2to3

This PR turns off 2to3 when running `setup.py` and fixes a few lines so that the source code is Python 2 and 3 compatible everywhere.