Rewriting package layout