moved constants from DFS, finished DFS init, fixed race in cache