Refactored code to use d3, instead of canvas
added d3 api (svg.js)