Improve the downloading functionality