Added smoothing and adjustment of probabilities.