You both sound a bit immature, him for sending you sexual texts during a funeral and not realising nor respecting this sad and poignant time in your life, this at age 23 and you for actually needing advice on how do deal with what sounds like a pathetic boyfriend.
I don't know your age so can't comment on it but I will guess you are the same age or just a bit under. You need to take control of the situation and make a positive decision on how you move forward with him, we can tell you to break up with him but you probably would not do it so it would be pointless advice. I would say question how much of a positive or negative influence he actually is in your life and after that you can come to a suitable decision for yourself.
...and I'm jealous