Moved download code from commands.go to a seperated file