Getting state transitions worked out.