Fixes/refactoring to work properly with Cytoscape 3.1