CFY-143 if validation errors are found, returns a dict with all the errors (other minor fixes and optimizxations as well)