Rewriting packages