Refactoring MemoryFragment