Refactored the model again, now everything resides in model.py and communicates through pubsub