Stylistic improvements.
Put types in a new module to prevent a future circular dependency.
Add conditional page contents.