minor changes: added Defines; namespace gvars..