This could be an interesting tutorial/example.
Instead of recording the URL as:
http://demo.piwik.org/index.php?module=CoreHome&action=index&restofthequery...
We would use setCustomUrl() to record it hierarchically as:
http://demo.piwik.org/demo/CoreHome/index?restofthequery...
A script called demo.php in the doc root would use the $_SERVER['PATH_INFO'] to rewrite the URL, so URLs in Actions | Pages are still clickable.
I don't think the use of setCustomUrl should be encouraged, because it will break the links to the pages which removes an important/useful part of the Actions report (being able to click to a page we are analyzing)