Cleaned up old delete thread code.