Cleaned up transitionType function a bit.
Allow next transition type to be set programmatically.