LBFGS python port, minor cleanup