Reorganized the router