Refactoring quiz components