Move all state into the state tracker. Reduce tracking to a single loop. Increase internal delays in clients.

Next we should move the common code to a library, but this is a good start.