Move parameter estimation loop to C++ (and keep the old code for
reference)
Remove old code