Added Graphs and cleaned some code.