Fixing docstring, comments. Migrate to python3.
Fixing tests. Migrating to python 3.