De-globali[sz]e AllPages and Prefixindex

Change-Id: I2ea969b3bf2573448562fd98b9306997bcfcfea4