Way too many candidates were running. They need to have no more than three. Each candidate should go up to a committee and state their case, and from that three are selected to run.
Gasp! You're suggesting a return to the dreaded Smoke Filled Room! I happen to agree with you.
The practical application of the idea would be for the party to name some number of "vetted candidates" who best represent the principles of the party and have the qualifications to serve in the office in question. (Not just the presidency, in other words). Other candidates would be free to enter the fray -- but as people who have not been "vetted," their chances would be significantly diminished.
This is what a political party is
supposed to do. It's pretty much the party's main responsibility.
That said, a few observations.
1. The principles and qualifications demanded by the party are at the mercy of those who decide on what candidates are considered "vetted." The battle for the heart of the party, therefore, would be fought and won or lost in determining who serves on the committee.
2. The strength of the party depends on the qualities of the committee. A weak or misguided committee would pass on weak or misguided candidates. One wonders if Trump would have been declared "vetted" by today's RNC hierarchy: I suspect he would have.
3. Because the committee becomes the locus of political power within the party, and therefore the nation, it is susceptible to corruption and undue influence by big-money donors and power brokers. The interests of the broader party membership, not to mention the general population, are secondary -- if they are considered at all.
4. To mitigate the influence of power brokers, the membership of the vetting committee must be term-limited, and made accountable to the broader party membership, via state conventions. IMO, membership of the committee would be drawn from each state, perhaps in accordance with the number of electoral votes; or perhaps on a two-per-state basis as for the US Senate.