The current procedures were designed for a version of the USA where only a few property owners could vote and senators were chosen by state legislatures. Under the assumption that political parties would not exist.
Out of the 57 presidential elections we've had so far, 4 have had the second most popular candidate lose. 2000 is just the most recent example.
im not sure if the most important step would be to reduce the influence of states over citizens (a state with 3 electoral votes is wife as important as a legal entity than for its people) or to get a proper voting system that doesn't impose a two party limit. Proportionate voting could work, but there are other superior alternatives, like multiple votes per voter. That would encourage voting for minor parties as well as the big two.
Love and tolerate.