Cleaning up some code in the routes command.