class docstring, and docstrings for the helpers?

Also, those helpers look like reasonable free functions.