halacha. i used to think a lot more about halacha than i do nowadays.
Though the Gemara is a master piece and the rambam has never been matched before of after in his redaction of the halacha but the problems are several.. First for something to have hope of being a moral system it should be logically derivable from it that unmoral actions should be forbidden-- and not just derababan.
Since this is not derivable from halacha therefore halacha needs to be combined with reason in the typical rambam and old sefaradi school of thought (Rif and chovot levavot etc.)
I say this with sadness because i used to think that sincere commitment to halacha was enough to make a person moral. The sad truth is that it does not. Only that after a person is already moral then halacha can guide one to devekut in God.

But even halacha itself i have a few comments about.
Shulchan aruch was never written as a pesak halach rather as a short review of the beit yoseph. the beit yoseph itself is not the actual opinion of the beit yoseph. he wrote that he wanted to write his opinion but that road is short but long. So instead he wrote the majority of rif rambam and rosh. In plain English that means he poskin like the rambam except for ketuboth. but the idea was that comminities were going in different directions in pesak and the beit yoseph wanted to make a sefer that everyone would accept--even if it is not his actual opinion. This is a major problem in the idea of the validity of the shulch an aruch as being a viable halacha sefer. It was written to be political correct --not to be accurate.
The other problem is that when you say shulch aruch what exactly do you mean. The shach taz and magen avraham on almost every page disagree with the shulchan aruch. The actual page is many different conflicting opinions.
In my opinion the only real halacha sefer ever written is the rambam with the rif a close second.The rest iof iy is just like some kid with a crayon trying to copy the Mona Lisa/.
The further problem is that it is a mask to hide rabbinic agendas.
So my actual opinion of halacha (which i wrote in my little booklet on bava metzia) is that the only real source of halacha is the Talmud. The rambam himself claims validity only in so far as it can be proven that his pesak is the real pesak of the gemara.