cleanup of defs with global scope