Refactor DetailViewGenerator