Reconfigure routes and add tests