Added simple error handling (show toast if download failed). Code cleanup