added the d3 work, it is still a work in progress, and somewhat messy. Sorry about that.