cleaning up graph generation
more cleanup (in progress)