Refactor Pages to break up dependencies.

Fixes #228