Updated download functions
Committing current version of dev code.