Hg 113 support for subpages

Refactor code to work with subpages
and some better support for comments (but this still needs some love)
Should be out of the `if` block. Also why `Previous` is before the comments and `Next` after. And they have to be i18n-ed.