Moving more logic into router dealing with setting path