Support extending a schema and raise errors if there are unmatched keys

Also organize files a little better