Removed old code and added a test for checking cart state