Cleanup and fix route double-match issue