convert categories to routing
various small fixes to categories module and routing
Merge pull request #2012 from craigh/routing-categoriesmodule

convert categories to routing