Export and import rewrite