Add download function.
Cleanup.