Adding depth first graph traversal.