Moodle.2x question/type/ordering tidy up and optimze javascript