Updating the d3 code a bit