clean up and added exceptions

renamed UploadProgressHandler to UploadHandler
Fixed indentation issues (tabs=>spaces)
Add exceptions