Removed some unneeded code, and added error checking to more types of downloads