remove unused require()
remove debugging code
allow passing in a schema id, instead of a schema, to the validate() function (the schema must have been previously-registered)