Added dynamic switching of pages + navButton