renamed variable
move all the JS and HTML bullshit to external files. Return JSON response when doing download request (this wont work as its written now, needs to be tested and fixed)