cleanup + docstrings