Getting all of the state machines and accesses to "global_state" to work together to avoid race conditions, etc.