Refactoring get_router()
Rework the ugly exception catcher