OO refactor

I've pulled out a few of the obvious objects like Page and Link into their own classes.

Hopefully this shows how to move forward with maintaining and growing this. I can also help with the next steps.