Trying to clean up generate graph