Trying out d3 charts
Refactoring code