Maybe it's also worth thinking about how to document these various data structures.  Perhaps some docstrings in `backend.py`?