Refactor traversals to increase flexiblity.
Part 1 of 2; currently breaks the build.  Will fix with part 2 tomorrow.