d3js improvements