Implemented graceful termination of all or selected server threads and the main thread.
Removed a couple of extra lines.