Improved cleaning of input fields.