DFS in C++ and some other small changes and fixes.