Renamed Thread to State and State to Global