Clean up transition logic a little