Changes to add validation to the models