Attempting to factor out old DFS.
Finished factoring out old DFS.
Formatting.
Renaming in main.