Created the asynchronous state machine factory