some more work here, mainly in graph.js, though