Simplify MIN expression with temporary variable.
Fix style issue.
Fix logic for cancel uploads.
Use property of AlertView instead of magic number.