Add docstrings based on review feedback.