Convert config checking into a loop
Remvoe first working config gunge.
Move schedule validity generation to a function.
Move config finding code to a function.
Move next-config finder to a function.
Mark a config explored in a subroutine.