Score state machine refactor.