From comments on first PR : no more curring in the BFS (now flattenBFS),
renaming of some vals to follow comments.