fix timeouts in firefox
change mimetype to csv
small attempt at the script timeout fix
significant performance fix