Added some comments to visualizer.js