Alters code to properly make probability of a given class the divisor in ultimate calculation.