Moved hook calls.  Added CleanExitException.