Cleaned up traversing.js