<human>: Can you succinctly summarize the text in 1-3 sentences?

My wife (21f) and I (25m) have been married for over 2 1/2 years, and we keep going through this cycle of problems. About 2-3 times a year things get very bad and we nearly split up. 

It first started about 2 months after we got married. It started because I was still having trouble adjusting to married life and was talking to other females online. I tried to keep it appropriate, but it didn't stay that way. This happened two or three times over the course of a year. 

Since then, when things go bad we end up fighting over me looking at porn, whether its with or without her.

 She isn't without her flaws though. Through some of my own research I've found her considering sleeping with another guy, and also her talking with her ex about how much they love each other. The latter happened once about two years ago and again just this past week. She kept talking him she was thinking about him all the time and they were constantly saying they love each other.

 She seems to think this is justified because she hasn't felt very close to me lately and she feels he treats her better. Here's the kicker though, her ex is living with us, he has been the whole time. This past week I've been watching their body language and I can tell something has happened between them and she refuses to admit it. I would have left a long time ago but we have kids together and the situation is just so complex.
<bot>: We keep fighting and having problems with infidelity.  I don't know what to do with kids in the picture, can anyone help???