Finished BFGS optimizer