Adds first pass at depth-first search