Refactoring

Made the Graph class implement the general, undirected type of graph.
Made DirectedGraph a specialization of the Graph class.