Added ability to limit which states can transition to which states.