Added better errors for undefined identifiers (hopefully).