Page refactor

Scalability work and bug fixes.