Changing validator to a module and adding more basic structure