Beta probabilities

Fixed merge conflicts with master branch.