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.
The idea of using treats to train is often equated with bribery. Truthfully, dogs do what works. If using treats gets them to do what you want, then why not? You can also use the world around you as a reinforcement. Every interaction you have with your dog is a learning opportunity, so when you think about it, you probably don’t use food very often except during active training sessions. So why does your dog continue to hang out? Because you reinforce him with praise, touch, games and walks. Just remember, the behavior should produce the treat; the treat should not produce the behavior.

Observational learning is the learning that occurs through observing the behavior of others. This form of learning does not need reinforcement to occur; instead, a model animal is required. While the model may not be intentionally trying to instill any particular behavior, many behaviors that are observed are remembered and imitated.[54] The domestic dog is a social species and its social dependency makes it aware of the behavior of others, which contributes to its own behavior and learning abilities. There is, however, ongoing discussion about how much, and how, dogs can learn by interacting with each other and with people.[55]
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.