Revert "Use MemoryCursor code in framework."

This reverts commit 6e992cfb90e9a9dd7d9523607dd60d180ea298a1.