added and cleaned up docstrings