cleaning up d3 code and removing duplication
Merge pull request #102 from mfenner/more-jslint

Cleaning up d3 code and removing duplication