Fixed bugs/naming issues in models.py