Inventory refactor