Refactoring class LearnPersistence