Rearranged d3 code. Added map. UI adjustments