Fix TTY client build
Cleanup download code