Some prefactoring prior to generating nice looking urls.