updated models.py API and did some renaming.