The concepts of "pack" and "dominance" in relation to dog training originated in the 1940s and were popularized by the Monks of New Skete in the 1970s. The model is based on a theory that "dogs are wolves" and since wolves live in hierarchical packs where an alpha male rules over everyone else, then humans must dominate dogs in order to modify their behavior. However, recent studies have shown that wolves in the wild actually live in nuclear families where the father and mother are considered the pack leaders, and their offspring's status depends on their birth order which does not involve fighting to attain a higher rank, because the young wolves naturally follow their parents' lead.
It's not so much the dog doesn't listen, more that he doesn't understand what you want him to do. Go back to basics and don't punish him when he toilets indoors. Double your vigilance and take every opportunity to put him outside to toilet. The crucial thing is to be present when he does toilet in the correct place, so that you can reward him. This makes him keener to repeat the performance to get another treat. Conversely, if you have been telling him off for indoor accidents he may already feel inhibited about going to the toilet in your presence, including when he goes outdoors. This is one reason why it's important not to punish for inappropriate toileting.
A training class is not there to train your dog. Its purpose is to teach you to train your dog so you will need to be committed to train your dog for short sessions (5 minutes) several times a day rather than just simply turn up for classes! This little bit of training everyday will be repaid with a lifetime of living with a well behaved dog. You will also learn to avoid problems before they begin as well as receive help to overcome any that you already have with your dog.