BetaEstimator refactoring