Removed draw() function and replaced it with calls to d3.call() for the respective elements
Dispatch a custom javascript event instead of a d3 event, can be captured with a standard javascript event handler