Moved thread states from module to header