ValidateMap class codes refactoring