docstrings and small tweaks