Adding validators and unit tests