PDF and dot continuity

@brandonchinn178 alright here it is! Gunna go through and comment, then we can talk about the style changes!
I actually think that we shouldn't use `const`, because support for it is [still limited](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const). Notably, Safari currently fails silently when you try to redeclare consts, so I can see there being a possibility of more Safari-specific bugs popping up.