Move view helpers into models.