Merged new model.py and scheduler.py