Test your tap water as well. For the pH test, place some tap water in a shallow bowl for a few hours (or overnight), then test the pH. It is possible to have some small amount of nitrate through the taps, but I'd be really surprised if as much as 40ppm was coming from the taps. Don't worry about the nitrate too much though. The NO2 is what we want to address.
Start by doubling your water changes, 50% twice daily, once in the morning, once at night. Next, add about 1tsp. of salt for each 5 gallons of tank water. This will help compete with the NO2 in the fishes' gills. It's not strickly good for the cories, but balance the presence of Cl- vs. NO2, I think that salt is the lesser of the evils. Bring the concentrations up slowly. At your next water change, add 1 tsp. for every 10g. The next change, after the water change, add the same amount. After a day, bring your dose up to 1tsp. per 5 gallons.
Someone should double check my dose recommendation, I erred to the side of caution, but I always forget the exact amount.