modularize vaisualization.js