Added models.py + other changes to use models