Added a DFS traversal.