add cart and related functionality, changed some features to better match spec