More refactoring around validation