kill global variables

by turning getFlag() into a static method of the Orig class