Adding the ability to use d3, which is far faster, and various tweaks