Cleanup thread_entry definition a bit. Reorder members so that related ones are next...