Use d3.map in NewStylePlot. Also clean up some other code slightly [type-d3-map-set]

I can't see the rest of the code in the diff, but if ddk is not used here, can we remove it?