Refactor attribute selection into models.