First pass at implementing deserialization.