clean up the inventory functionality