Adds basic control code for DFS