Refactored pagination logic
Pass pages their own name for rendering contextual nav
Refactored context object to be a global variable