Some code in exam.js file was refactored