Quiz refactoring