Moved shutdown activity to the supervisor.