Added discounts and fixed bugs