cleanup traversal.js