Added validations and relations to models