Major refactor, now single threaded

killThread throws a ThreadKilled exception. We expect the thread to be killed, so we just catch and ignore the exception