Cart Rewrite

Everything seems to work as expected in my testing, so I think this could be merged into devel.