Preliminary support for task restarting.
 Cleanup