Start refactoring to fully support cytoscape.js-style JSON.