I think this entire section needs to be refactored a bit now that all flags are frame-specific. Would prefer to mark this as a TODO and clean up once all the framing changes are in.