Added DirectedGraph and fixed a bug in SimpleGraph