Implemented serialization ability to inventories.