docstrings and improved usage