Getting segmentation fault with bfs. 1-2 functions still left as I am working on debugging