Refactor Flags

Tested again and can confirm every combination works correctly.