Adam,
MiniV is right.
You did NOTHING wrong.
You should be able to expect faithfulness in a relationship. Texting,hanging out, cybering leads to more and in itself , is an unfaithful behavior.
He was turning things around and trying to make you look like the bad guy. Its not YOU that is to blame, it is HIM.
DEMAND better for yourself. There is someone out there that these things mean the same to them. Someone who wants and demands faithfulness in a partner, and you will find that person. Don't try to hang on to a relationship that does not feel right. It will end up making you sick, mind ,body and soul. Having to worry about faithfullness in a relationship becomes a full time job, the worry never ever leaves you for even a moment.
I hope that, soon, you find someone that is deserving of YOU.
Hugs for you,
Robin