Some changes on the methods ValidateInput, ProcessDigitInput and ProcessCommandInput