Change NDEXMemoryPersistence to a class