 	int Nconsecutive = 0;
 	int Nsteps = 0;
 	while (t + Roundoff < t_end) {
-		if (!Reject) {
+		if(ANY(!Reject)) {
 			dydt (t, pr, y, F0);
 		}
-		if (!SkipLU) { 
+		if(ANY(!SkipLU)) { 
 			//need to update Jac/LU
-			if (!SkipJac) {
+			if(ANY(!SkipJac)) {
 				eval_jacob (t, pr, y, A);
 			}
 			RK_Decomp(H, E1, E2, A, ipiv1, ipiv2, &info);
-			if (info != 0) {
+			if(ANY(info != 0)) {
 				Nconsecutive += 1;
 				if (Nconsecutive >= 5)
 				{
-					//todo implement return codes
 					y[0] = logf(-1);
 					return;
 				}

	#define NEWTON_UNROLLER	#pragma unroll NEWTON_UNROLL
#else
	#define NEWTON_UNROLLER #pragma unroll 1
#endif
#define Max_no_steps (200000)
#define NewtonMaxit (8)


            NewtonDone = (NewtonRate * NewtonIncrement <= NewtonTol);
#ifndef NEWTON_UNROLL
            if (ALL (NewtonDone)) break;
#else //only break if it's at the end of the unroll
            if(ALL (NewtonDone && (NewtonIter + 1) % NewtonIter == 0)) break;
#endif
            if (NewtonIter >= NewtonMaxit)
            {
				y[0] = logf(-1);
				return;
			}
		}
		if(ANY (!NewtonDone)) {
			H = Fac * H;
			Reject = true;
			SkipJac = true;
