Added docstrings (#4). Fixed #7.