Oh let the wickedness of the wicked come to an end. It is not the removal of the wicked, but the removal of their wickedness, that David desires (comp. Psalms 10:15). But establish the just; i.e. protect strengthen, and sustain him.
For the righteous God trieth the hearts and reins (comp. Jeremiah 11:20; Jeremiah 17:10; Jeremiah 20:12). "The heart, as the seat of the understanding and the will, the reins of natural impulses and affections" ('Speaker's Commentary').