Changes to the input validation code