Replace hardcoded mode letters passed to IsModeSet() and friends with ModeReferences