Implemented untested of version of BFS working with my generic graph input.