Adding validation tests and code