Coding style cleanup for cart api, no intentional logic changes