Fixed d3js output, changed model structure