A little refactoring and clean-up. More needed to make BFS / DFS more similar