More docstrings.

Added docstrings as needed and edited comments.