If you're going to pop name out of models regardless, could models.get be replaced with models.pop?