More cleanup of the traversal logic
PEP8 cleanup