Made flags and alternation pattern validation tests pass