Incorporating review comments.
Cleanup handling of multistage jobs when they are killed.

Author: Sundeep Narravula <nsundeepreddy@yahoo.com>