Superficial thread code cleanup.

Also a slight change to the model.