fix initialization of d3 object
fix variable name typo
fix variable arguments processing
Merge pull request #6 from djdeath/fixes

A few fixes