Moved some stuff around and refactored getting the download url