Python 3 Implementation.
Added docstrings for public interface functions.