organizes vis.js code