Minor style changes, validation functions correctly declared via data types. Needs heavy refactoring if $ref resolving and storing errors in a tree should work