It helps to teach your dog what "good" means. Load it with meaning. How do you do this? Sit with your pup, so he's sitting right in front of you, and say "good' in a brisk happy voice; then hand him a tiny treat. And repeat about 20 times. Do this a couple times a day for a couple days.
Now, when you use the word "good," since your dog is a pup, you need to reinforce the meaning of that. Much of the time you're going to say "good" and you're going to hand him a treat. As our dogs master commands, we can phase out the treats. As they learn new commands, we use treats, and we phase out treats more for old commands that they know well.
But I still like to hand out treats occasionally even for the simplest command. My 15 year old still gets a snack for a fast response to a sit command now and then. It reminds her that there's always a chance that there's a paycheck for her work. Random reinforcement. If there's never a paycheck, why work?
With regard to class vs. home, dogs have to perform commands at least 15-20 times in an average of 15-20 different locations (including locations with distractions) before you can be sure that they truly know the command. Why? Because dogs don't generalize well. They don't realize that Sit means I need to Sit everywhere. They learn that Sit means "put my bottom on vinyl floor next to the refrigerator" because you make them sit for dinner. Then you teach them to Sit at the park and that means "put my bottom on the grass or my ball won't be tossed for fetch." Then you make them Sit before you cross streets on your walk. And they learn that "my bottom has to be placed on concrete, and this black asphalt stuff too, or the walk stops." All of these lessons get added to their cognitive database. The more places you take them and reinforce the commands, the faster and better they learn.
Pretty soon, there is enough data there that they realize, "Sit means put my buns on the ground or floor, no matter where I am, what else I want to do, or even if there is a squirrel running by me. "
Then your dog has truly learned what Sit means. One of my trainers always announces in her lower level classes, "You need to be taking your dog everywhere and training him. Don't EVEN come to class and tell me that 'But my dog always does this at home.'" And she has a point. It's one thing to have a dog that follows orders at home. But when our dogs are in public, that's when we really need them to be obedient.