Add FSM (Finite State Machine) support.