Fix docstring formatting and elaborate some docstrings.