Implement BFGS minimizer.