Moving the method cleanInstance to XStreamBuilderImpl.