model.py cleanup