Added validation tests and model validations