various code tweaks for checkout history