Add d3
Cleaner code
Merge