I am running through the proram's entire workflow from scratch after having modified it so extensively. This first commit is a set of minor fixes to syntax and bugs in download.py
Changed database to caps to indicate it is a constant to be changed based on database in use. Updated the imports to group standard library imports, third party imports, and then application specific imports. This is PEP compliant.