Improve the generation of imported and exported packages.