Changed to use Kryo serializaition