Cleaned up download progress calculation.