Huge update for docstrings; minor style changes.

Code functionality and implementations untouched.