cleanup serialization tests and di.