Add unit tests for models.  Fix validation in models.  Fix default_scope.