A few fixes, including improvements to the traversal code