Some simplification and streamlining of the simple-graphs.js code.