Cleanup of methods and docstrings.