Add state machine class.