Updated the progress function to accurately represent the loading percentage and fixed the onComplete() trigger to only trigger after the last animation.