Added some validations and scopes