Rewriting discounts module.