Added d3 chart, updated functions