add docstrings and clean up lint