Added FLAGS processing, multiple codepaths