rework condition testing and redstone setting tables; add control loop