refactoring in preparation for LBFGS port