fixing regressions and some bugs, make fminCG's extrapolation limits
configurable