cleanup of schema validation code