commented and cleaned download script and classes