Using z-schema-errors to report errors

Standardizes error reports and reduces the amount of code. First step towards allowing error customization.