Basic deserialization infrastructure.

A lot of stub functions. Missing real implementation.