Add options and use traditional lp residual in functions, as described in the papers