add docstrings
Finish docstrings, code cleanup