Refactor download command to use search