Small improvements for readability: comments and docstrings.