This seems like useful generic functionality stuck in a quite specific module.

Is there any reason not to elevate this to be available for other modules across the platform?