Remove uses of platform, switching them to import