Proper algorithm to choose most specific route
Adds jshint checks