cleaning up deprecation warnings and adding validation error stuff