Changed Cart logic. Merged with Anjali's code