Refactor DiscreteDistribution