chaned to using commons math Nelder-Mead minimizer and log factorial
removed unnecessary imports