Changes to how Checkout works and changes to some invoice queries