consolidate cross-origin class helpers into the same file