refactoring of graph/node/edge data structures. minor updates to graph generation. some code cleanup