Improve formatting and docstrings.