More refactoring to the validation