Exception and docstring cleanup