Added some validations and associations