Convert global functions to local variables in dialog quizme