Simple state switching is implemented.