Update 6

Further implementing the breadth-first search.