Added in Objective function portion for nonlinear solver