TODO: move all graphing to a single js to make keeping track of graphs and variables more logical.