Refactor base.
Rename to pagebase.
Refactor code to have less moving parts.