refactor of _parseRoutes in xen\application\Router