Fixed display and update of graph, plus numerous bugs