A few changes to the validation extension code.

Needs review