Added cleaning of the db before tests. Added base class for models.