It's working

I'm not sure how yet, but it is. I plugged in a function from a Puget
Sound paper and it seems to be working for all test cases.

Still need to add enough comments and figure out exactly how it works.