move javascript code from main.js file to new_quiz.js and one_quiz.js
refactor code