Finite State Machine data structure