Use a cache for storing scores in the score map.
Fixed a bug.
Improved a test.
Fixed a bug.
Don't replace the score map each time.