Changed deserialization to be done manually.