Added additional functionality to the graph and some bug fixes.