Removed comments, fixed upload file function