cleaning up traversing.js module