Refactoring the quizzy solution