Added experimental nonlinear CG solver, also some minor fixes