DFS and state improvements