Added sorting of subpages.

And made the structure a little worse, as it is always dicts now.
Which can make the templates a little ugly, but it works for now.