Added getCurrentState to get the JSON object of the graph