Docstrings and cleanups.
More documentation.