Update pdf.js
Refactor some js