Correcting some Python 3 incompatibilites.
Updating documentation.