Changed code in html to code.js, created a function called data to managed the data and a main function. Also created a new selection.js file to hold the js for the selection