Some simple API cleanups

Did some basic PEP8 type cleanups.  Converted tabs to spaces, added some basic docstrings.

The diff is unfortunately a little painful since most every line got a tab/space conversion, so the diff sees all the lines as diffing.