Starting to add code for serializing service factories.