Refactor key encoding and value deserialization
cli: Enable getting the data out of a leaf