refactor route-matching strategies

provide line breaks before a return here and above too, the PR lack tests though right?