Move object validator to src folder
Refactor objectValidator with unit tests.