Added UpdateInventory() and started moving stuff to it.