Refactors the creation of the chart to a new function
Refactors a few variable names
Removes unneeded console.logs and old example chart
Adds a control to set the # of bins