Maybe move `var progress_increment = ...` to here. That way you don't have to calculate the `progress_increment` every time in `updateProgress()`.