latest round of router cleanup

The page index is now more normalized and is turned into machine code in the one place it is needed.