fixing some bugs, and adding basic d3 charts