refactor main, interactivity: moved code related to setupD3 to interactivity.coffee