tidying up the D3 code a bit