Honestly, first problem. Why you even let yourself treat so shitty by girl totaly under your level? Because she is good loking? Ok, but than what? She act as total bitch and you let her stomp you. What is she thinking about you after that? Thats not how value is build up. For her, you are now just stupid moron boy she can play with and throw at him her own frustrations from her horrible life. (sorry, I dont want insult or be rude, Im just totaly honest)
Maybe you just stick with such girl, because you think. Hey, her value is so low, maybe I can have higher chance. I can understand that if you just want get fast bed time and than bye. But this doesnt seem like that case.
My first advice, date girl with at least same value as you have.
There wasnt much detail about your hang outs, so hard to say where was problem. But here is one I noticed. Never, ever, let her talk to you about her exes before you get intimate (dont even mentioning how she hang out with them!!!). Thats best way right into Friendzone, be guy she turns to with her troubles.. ("oh on last my hang out with my ex he just.... surely you would understand me .. blablablalba"). You dont want her do that. Dont be rude, but let her directly know that You are NOT interested in talking about them. Let her know, hey, I dont care about them, Im here, not them and I want be your mate now.