Added the scoring functionality.