added documentation to graph and did some minor renaming