Revert "Add memory management"

This reverts commit 8a92056630dc7fba5c0c37e0bfb5e75ae0221eef.