Hmmm. So get_badges is used to determine whether or not a badge has been earned, and to correctly style it as colored or gray, whereas get_badgeclasses is used to determine which images to render.

I can imagine a scheme in which when get_badgeclasses loads, a line of gray badges appears, and when get_badges loads, some of the badges become styled accordingly. Or, when the race is resolved the other way around, get_badges stores some state which get_badgeclasses accesses after it loads and uses to style the badges.

Would this be better? I can implement it if so.