At last your high scores are properly sorted! It ended up being more complicated than I could dream of, but I'm pleased with it and the things I learned along the way.
I also added some other interesting things as noted under Design changes.
Bug fixes and coding refinements
Known bugs and areas for improvement