Added self-termination of threads, and terminate-on-exit.