Added download_application() function