Add validations on models and update tests