cleaning up model.py