ViewInventory code cleanup