State transition manager