Christ was also harsh with the money-changers. But mostly Christ was harsh with the Pharisees, especially in Matthew 23. The Pharisees really wanted to do righteously. I suspect that was their problem, i.e. doing instead of being. At any rate, even Pharisees are not a lost cause. Paul was a Pharisee.
Nevertheless, the overarching commandment is the Great Commandment upon which all the law and the prophets hang:
Jesus said unto him, Thou shalt love the Lord thy God with all thy heart, and with all thy soul, and with all thy mind.
This is the first and great commandment.
And the second [is] like unto it, Thou shalt love thy neighbour as thyself.
On these two commandments hang all the law and the prophets. - Matthew 22:36-40
I think you miss Jesus' point. The 10 commandments are 2, love God and love man. If you follow those 2 commandments you fulfill the 10. The Pharisees loved themselves more than others.