Partially completed breadth first  search
Breadth first search now works. Needs to be optimized