s/position/pos/g
Fixed scope of sub variable usage.
Moved $previous inside the flag* infraction scope
Fixed variable naming ... again