Revert "Hunting memory leak during batch refactorings."
This commit did not help with the memory leak so reverting until proven it is useful.

This reverts commit 9541ca9eed9d1f15ba0ce3e05a3d1e613eee2b63.