The best thing that improved the consistency of my baking was better measurement. I started weighing my ingredients, as Cook's Illustrated found the mass of a cup of flour varied by as much as 15%. I bought a separate thermometer for my oven because I didn't trust its built-in thermocouple. After this, I never had bad batches of cookies.