Validation as separated object - started working.

Because assertions and validations logic is complex, I decided to move
it to another file.