Bit of reorganization
Fixes bug when creating new page