PDF and dot continuity

@brandonchinn178 alright here it is! Gunna go through and comment, then we can talk about the style changes!
Not really sure why we need these variables top level in this module: it would be more semantic and testable to pass them around to the different functions that apply the parts of the pdf: that way it's clear where they're needed and where they're not, right?