Persistent services, and more exception handling on shutdown.