Removing old usages of Java serialization