highcharts refactoring