Simplified the BreadthFirstIterator