Comments and documentation of model.py