Feature 8 - Added cart and purchase stock logic; added purchase history; added tests