update new untyped state machine API
Remove unused code and correct typo
Support ansync dispatch state machine event