Changed the traversal mechanism to include a cleaner, more readable API