Live updating of graph. Needs to be made more efficient.