Added API docstrings.