Added error checking to see if a state is used in a transition but not defined.