Change bookkeeping to data structure traversal