Added 400 errors when wrong request.
Added some cleaning.
More cleaning code.