Clean up.
Improve compatibility between Python 2 and 3.
Declare support for Python 3.