refactor, chart.js, modals