Remove Thread.kill duplication