Add unmarshaling responses.

I also appear to have found a bug in how the length field for padding
items is calculated.