Something that doesn't entirely work
Fixed the BFS.