Decouple confidence and score. Refactor some related definitions.