Fix serialization of empty bundles
Add support for shelf deserialization