Removed an unnesessary division.
Removed an unnecessary copy.
Moved estimator creation to a separte procedure.