Replaced download function with something SSH friendly.