Refactoring of Directed Graph. Development of Breadth-First search and Depth-First search.