Simplified the structure, added d3 rendering'