Global state enum and stuff