Welcome to the world of 5 year olds, lol. I just recently adopted Chloe, my 4.5yo Sheltie. Even though she's new to me, she's got pretty good focus. The gal that doesn't have as much focus is my Nell, she's a 20 month old BC. What I've been doing with her is doing what they call Flat Work in Agility. It's where you have your dog on leash, and be really excited, running one way, then reversing direction and get your dogs attention on you. Keep doing it til the dog is right with you. Also, if you hold training sessions that are too long, the dogs will eventually burn out, unless he's one like my Betty that just goes, goes, goes, lol. For lack of attention, keep training sessions very short, as in 1-3 minutes each, but several times a day. Don't force the dog to do anything. Also, you want really good reinforcers. I like using hot dogs, my 3 girls love them. You can even change up the reinforcers as well, like hot dogs one day, cheese another, peanut butter another, a toy another, etc, etc.
Other things you can try, if you've done some clicker work, is targeting and eye contact. Take the treat and place in your hand with fist closed. The dog will try to get the treat. The instant the dog stops and looks at you in the eyes, click and give the treat. It won't take long and the dog will look at you instead of going to the hand and sniffing, trying to get the treat. Once this is accomplished, then do it while standing, then while walking.