BFS
Refine BFS, remove definition in structure