Changed from a namespaced class to a simple globally available utility function.