Slightly more graceful startup and shutdown.