Change the ptable.
Add a function to get the baseurl for root pages. Add support for sitemaps. Reorder some functions.