Remove extraneous thread code.