Added docstrings to the api functions.