Javascript, csv cleanup