update docstrings and other cleanup