Support for clean shutdown, woohoo.