Connect middleware to clean empty fields and delete those specified in _delete