Added back some dearly missed unit tests, and refactored the median score code a little more