Move a bunch of utility functions not specific to EDM-Next into some of
the globally used headers.