Did some refactoring that was long postponed.
Fixed (apparently) the sleeping bag. It should now behave more like beds.
Started messing with the inventory itemstack merging to respect slot types.