got csv to JSON working and cleaned up main.js