Added comments to discount.js