Add logic to determine where in the inventory to place an item.
Fixed line endings