Another round of styling to the docstring.
Merged in big refactor branch and fixed the merge conflicts.