More refactor. Added helper module, created dedicated validator module