Fixed a couple bugs. Added enforcement that transitions to be consistent in State.