changing downloads to use common functions. took logic out of source functions to make coupling less tight. made type more optional.