Preliminary threading work.