Refactor code for product to show index, brand and category