Every dog needs to learn to walk on a leash. Besides the fact that most areas have leash laws, there will be times when keeping your dog on a leash is for his own safety. Learn how to introduce your dog or puppy to the leash, then teach him how to walk properly on the leash, even beside you on a bike. A loose leash walk teaches your dog not to pull or lunge when on the leash, making the experience more enjoyable for both you and your dog.
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.
To communicate clearly and consistently with your dog, you need to understand how she learns. Dogs learn through the immediate consequences of their behavior. The nature of those consequences determines how they’ll behave in the future. Dogs, like other animals (people included), work to get good things and avoid bad things in life. If a behavior results in something rewarding-like food, a good belly rub, playtime with dog buddies or a game of fetch with her pet parent-your dog will do that behavior more often. On the other hand, if a behavior results in an unpleasant consequence-like being ignored or losing things she finds rewarding-she’ll do that behavior less often. Are dog training classes worth it?