Add docstrings and a comment.