Reorganized to use MonadProb class