Fix bugs and refactor for the shopping cart and ordering process