Revert "Persistent memory leak repairs"

This reverts commit 586dfe2983de97fde322c9606aba539cb03390bf.
The last merge we did completely sent everything to hell and I have no idea why. This commit reverts the code backward significantly in an effort to avoid the weird errors we were getting.