refactored js, highcharts stuff still ugly