Finished MLE and MAP estimation