We solved the nighttime "sleeping in our bed" problem by establishing from the start that the cat is invited into the bedroom ONLY when I let him, which is usually for a few hours in mid-afternoon. I love our cat, but I'm over sleeping with a furry bed hog.
Had too many years of doing it (with multiple cats taking up most of the room on a CA king), then went petless for 10 yrs before this stray showed up. Fortunately he's a mellow adult cat so he adjusted easily.
I've never had any real problems training cats. They aren't allowed to climb curtains, scratch furniture, or get on the DR table if there's a tablecloth on it. No biting or using claws as weapons, either, unless they're terrified by something.
There was only one cat I couldn't train. She was one of the most beautiful, but possibly the dumbest cat I've ever owned in 60 yrs. She would start to walk across the room and then stop halfway, and you could just tell by the look on her face she'd forgotten where she was going and why!