Refactoring, fixed tail recursion not applying to bfs