Clean up

Update naming to match conventions. Tweak d3 to avoid selecting the sam dom object multiple times