ui fixes
minimize d3 code