Python 3 compatible.

Also a minor typo.
Document the functions.
Python 3 compatible.

Minor additions to say what's going on.