Removed evaluateScore's reliance on side effect, added tests.