Cart refactor