First part of #308, improved deserialization speed by 4x as per test