Made the inventory file work