Traversable graph

Improve readability and pythonicity