Final commit, download csv is half working