Added enumerating through the shape tree.