Inventory refactoring