Support Directed and Undirected Graphs - cleanup