remove unused code, improve cytoscape.js implementation