Fix transitions for string tokens
Start work on state machines