Split js into standalone file
Change d3 selection logic