MemoryCleaner refactoring