Refactor flashcards to OOP