Refactoring SuperMemo service