A_Saw flag submissions, and compatibility fixes

-jpalomo's A_Saw flags submission.
-Christoph Oelckers's latest compatibility fixes