Clarity edits, some docstrings added.

Removed unused partition function.