I can't get my girlfriends ex out of my head.

Me and my girlfriend have been going out for almost 6 months now, and while we've had ups and downs as any relationship does, we're generally very happy together. However one thing that I've always struggled with is her ex boyfriend. I won't go into details, purely because of how long it could take, but he was a deeply vile person, manipulative and dangerous.

Im not entirely certain what aspect of his existence bothers me. One part of it is just the anger that he could do those things to her - I'm not an especially violent person but because of this I find myself constantly thinking about fighting him, even though I would certainly lose.

Another part of it is how she seemingly doesn't hate him, and I fear may still like him somewhat. I know for a fact my girlfriend would never cheat on me, but it worries me none the less. That aspect of it was exemplified and made 100x worse by one particular day.

She asked me to come with her to see a friend of hers, who originally she had met through this ex, and so I did. I expressed my discomfort with the whole situation, given that A) this ex had recently just moved back into this area and we were very likely to see him, and B) this friend she wanted to see was fully aware of all the horrible things he did, and equally was at the time, and yet still continues to actively be friends with him and did not stop him at all. She basically ignored everything I said for a week, and eventually the day came. We drove up, hung about for a bit and had a nice time walking around the shopping centre before her friend arrived. Not much of note happened here, but whenever she saw someone vaguely resembling him she would stop, ask if it was him, then try to go up to him to check, rather than just avoiding him. After an hour or so the friend arrived and we had a slightly awkward hang out with them for a while, until they told us that the ex was coming out to hang out right now. My girlfriend had previously said that if we bumped into him we would leave, but now that we knew for a fact he was coming out, she refused to leave at all. Even when his own friend came over to warn me that he was very likely to start a fight with me, she actively insisted on staying. He showed up after a bit, and even then she wouldn't leave - and even actively made conversation with him, complimented his jeans and told him about her sisters. I do not think she WAS flirting, but generally the way she talks is very similar to it, which has raised issues in the past. Safe to say she was not trying to avoid him, though. I kept telling her I felt incredibly uncomfortable, and to be honest unsafe, and yet she still wanted to stay. I hate to admit, but I didn't handle the situation very well, essentially freezing up and following along in near silence. She only eventually let us leave after about 45mins when her ex took us all into the woods and I told her I was going to leave wether she did or not. I wouldn't have actually left withoit her, because I do care deeply about her safety. It's worth noting however that he WAS blatantly flirting at her, which she didnt seem to mind at all. I was a bit pissed off, and the argument after that was to date our largest, and it caused a lot of instability in the relationship. I am no longer angry at all about this, but I do still think it was all odd.

Generally everything about him upsets me in some way - down to tiny stupid things. For example, he and her have the same starsign I do not believe in astrology, nor ever have, but the fact that could matter to some people gets to me. Equally, she broke up with him very soon before starting going out with me, something I didn't actually know until recently. I don't think she's fully emotionally out of that relationship, and has explicitly said multiple times she still wants to know what went wrong and that she doesn't want him to dislike her. Honestly there are definitely more things that upset me but I've just forgotten to add them in.

Please if anybody has any advice at all on how to A) get over this whole situation and put him out of my mind, and ideally B) help her get over him fully if she hasn't already.