Updated models.py to reflect new database architecture