Flashcard refactoring