Incorportated partially functioning BFS with lots of debug print statements