Some naming changes to thread.c