A bit modulraized.  Still need to separate Cytoscape.js code.