Added docstrings to library functions