d3 visualizations; working but need cleanup