Factor out controller error-handling
Add helper function to extract flattened list of examples for flashcards. Better output in flashcard when no examples provided.