Optimize route handling