pushed in script import to avoid cycle (but this breaks the test, so the test code should probably move to a different module?)
Update medium mapping to fix problem with broken uip medium names in aggregate