Use d3 line generator
Use predicates to clean this up
More tweaks to the example