Fixed delete def so that the traversal is more straight forward.