Made a private API public. Added a task switching test. Fixed a bug uncovered by that test where we would never exit properly.