You could make all elections non partisan and remove parties from the primary process. Free to join whatever party you want, but references to it won't show up in ballots or create separate primaries. Personal opinion here, but doing primaries this way is the biggest driver of the garbage we see currently. Everyone caters to the base in the primary by stating how much better they are at owning the other side. It's always been strange to me that the parties get to basically operate the primaries.
States operate the primaries. If a state wants open primaries, closed primaries, or caucuses it is all on the state.