Inventory: DB fixes, basic frontend