Made states store transitions as strings rather than a weakref to the next state.