Line charts
Refactored code - amending flow of main.js