Changes to new d3.js coding style