Moved model definitions into models.py