Refactored gc_safes to make them more convenient to use.

[#57143634]