Move logic from remote controller to model.