getInventory now returns an array of items. Add fee calculation functions. Return number of items sold in price history