Refactoring for memory adaptor