Almost done deserialization code