Depth first search fixes
Graph generation fixes
fixed merge conflicts to merge from vasilis