Inventory model changes. Fixes #133