Remove unneeded routes, improve robustness