Fixed a mistake introduced in the refactoring.
Now uses shared code for pages files.