add download file + various JS fix
merge