Testing assignment, refactoring

Refactoring of validation