Refactored LBFGS call.