adapted page routing to work with supplied routes and controllers