Inventory refactored a bit.