Add score function (not fully baked yet).