Removed validator trait
Refactor code