script: Eliminate unused traversals and then add a new flow-like traversal strategy for use in box building

r? @metajack