Cleanup code + error 422 management