better docstirngs for re_sort
docstring with doctests for instance_of
functional tests for the optional validator as key
make use of an is_empty helper
fix asserting false on not_empty
engine now sanitizes schema by removing optional keys that are not in data