change the big Test object to a Thread and all the others to daemon threads. Should close automatically when the main thread terminates