Added the Kryo serialization.