generalize Discounts and Goods, and refactor Discounts