change client download signature
remove useless code
emit events on download