Clean up BFGS code and messages a bit further.