Added exit hooks to Common.
Other apps now clean up on exit.