Update docstrings, add a few comments