Breaking an oath
Q: When I was in grade 7, around the age of 13, I'm not sure whether I was baligh then, but our school went in a camp tour and at the camp some of the boys including me were swearing when we were talking. The camp instructors heard us swearing and reported us to the teachers who then threatened to report us to our parents. Me being young and terrified I said to my non Muslim teacher out of fear of my situation 'Kassam I won't swear again'. Does this count as an oath? Also when I was in grade 8 I felt ashame of an act that I committed so I said while making dua, "Forgive me for committing that act, kassam I won't commit that act again" I haven't sworn or think I've used a swear word since and I've committed the second act about 10 times in the last 5 years.
I want to know if this counts as a breaking an oath and what do I have to do to get forgiven? And do these oaths even count because I'm pretty sure I wasn't baligh for the first 'oath', and the second one I made when I was baligh while making dua I said those words ' kassam I won't do it again' Does the oath count?