Make Validator a class to improve code readability