refactored out the getPageTargetScale, now usable in both index and index2...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>