FSM cleanup