One common misconception about cats is that they are independent. The reality is that they are very expressive. The problem is that most people don't recognize their expressions, which are a form of language they use to communicate to us.
This pseudo language develops based on their environment and living situation, with a few cues that are almost standard. One example is the tail twitch, where they wag the lower half of their tail quickly from side to side, often signifying annoyance or anger. Pepper uses it to show she wants or needs something.
The wide wag is a sign of happiness or playfulness, combined with other cues to make the meaning more clear, such as pointed up or down. This one is almost universal, I have seen no cats use this cue for anything else yet. Even Pepper seems incapable of keeping her tail still when she's happy or playful.
Essentially, the human companion will learn these when they spend time with the cat, it's simply a matter of paying attention. However, when we do not try to recognize these, the cat will think we're ignoring them and pay us in kind, by ignoring what we tell them. Though they can live on their own, we engineered them to depend on us for affection and attention, they crave it.
So now we have the other side, how do we communicate with the cat? They communicate with body language and tone, it's also what they understand best. The tone in your voice is one of those nearly always understood forms of communication, almost all mammals will use the same tones for the same meanings.
So to ensure they understand you best, make sure your tone and body language demonstrate your meaning. Felines have almost no interest in learning the complex vocals we use for language, to them it tells little about what is meant. So when they are good use happy tones and body language.
When they do something wrong there is rarely a reason to punish them, and never a reason to strike them even a little bit. To a cat there is no "gentle tap" when they are being punished, and they will resent being struck and only act up more. We do have a tone they understand very well, they use it for their kittens all the time.
To let a cat know that they are doing something wrong or dangerous, use concern. Think of them as a human child and tell them gently, firmly, and with only a slight emphasis, not to do it. Watch them, make eye contact if you can, and don't pet them when saying it. The loss of attention is another useful method for a few behaviors.
The loss of attention or affection should only last during the negative behavior, then resume once they stop, they figure it our very quickly for a few common problems. The first is the kneading, when they are under the bliss of pets, they often use their claws without thinking about it during the kneading response. Simply stop petting them until they withdraw their claws.
They will test it for a bit first, trying just the claws, longer or shorter push/pull motions, and eventually without the claws. Cats are pretty smart, they can figure out the difference in such occasions. Another instance is during play, they sometimes bite or claw without realizing it hurts us.
Wrestling with the cat can be fun, and entertaining, using just your hand they roll onto their back and play fight. But their claws hurt, so most people don't do it much. This wrestling is a lot of fun for the cat though, so they may even resent you not entertaining them. So, do the hand wrestling, then when their teeth or claws hurt you just stop, don't pull away, don't get angry, don't reprimand them at all.
Just freeze your hand in that position and look at them without an expression, or show pain in your eyes. Once they release enough that it no longer hurts, play some more. Like with kneading, they quickly figure out why you stop.
The above will likely counter everything you have read in the books you buy, remember, they are trying to sell books, not help you and your best friend get along. If you have tried other methods, it may take a while for the cat to stop being angry before this one will work again, patience is what a cat's friend needs most, but don't return to the old methods or it will take longer for the feline to trust you again.
I hope you and your feline friends all the best, and Pepper says "mrreow."