Testing the graphs and fixed some bugs.