Move logic from controller to model.