Correct score calculation and refactor.