Use $tax_class variable and fix notices. Closes #3922