Use d3.map in NewStylePlot. Also clean up some other code slightly